{:W('Nav',array('name'=>'管理员列表','act'=>'添加管理员','URL'=>'addUser'))}
<link href="__PUBLIC__/Js/js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<!-- 订单列表 -->
    <div class="list-div" id="listDiv">

        <table cellpadding="3" cellspacing="1">
            <tr>
                <th>编号</th>
                <th>管理员</th>
                <th>角色</th>
                <th>操作</th>
            </tr>
            <foreach name="userArr" item="v">
                <tr>
                    <td>{$v.id}</td>
                    <td>{$v.username}</td>
                    <td><a href="relationRole?id={$v.id}">查看</a></td>
                    <td><a href="addUser?id={$v.id}">修改</a>&nbsp;&nbsp;<a href="runDeleteUser?id={$v.id}">删除</a></td>
                </tr>
            </foreach>
        </table>
    </div>

<script language="JavaScript">
    function sure($id){
        var xmlhttp = new XMLHttpRequest();
        var act = "{:U(GROUP_NAME.'/Order/sureOrder')}";
        xmlhttp.open("POST", act, false);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.send("id=" + $id);
        if (xmlhttp.responseText == true) {
            document.getElementsByName($id)[0].innerText='已确认';
            document.getElementsByName('sure_'+$id)[0].innerText=' ';
        } else {
            alert('传输错误，请稍后重试');
        }
    }
</script>


</body>
</html>